home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 November
/
PCWorld_2006-11_cd.bin
/
v cisle
/
feedreader
/
FeedReader306Setup.exe
/
{app}
/
stylesheet
/
custom(delicious).xsl
< prev
next >
Wrap
Extensible Markup Language
|
2006-07-31
|
7KB
|
264 lines
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:feed="http://www.w3.org/2005/Atom"
xmlns:fr="http://www.feedreader.com/ns/3.0"
version="1.0">
<xsl:output method="html" />
<xsl:template name="replace">
<xsl:param name="text-string"/>
<xsl:param name="find-word"/>
<xsl:param name="replace-with"/>
<xsl:choose>
<xsl:when test="contains($text-string,$find-word)">
<xsl:call-template name="replace">
<xsl:with-param name="text-string" select="concat(substring-before($text-string,$find-word),$replace-with,substring-after($text-string,$find-word))"/>
<xsl:with-param name="find-word" select="$find-word"/>
<xsl:with-param name="replace-with" select="$replace-with"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text-string"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="/feed:feed/feed:title"/></title>
<link rel="stylesheet" href="atom.css"/>
<style>
body {
font-family: verdana, tahoma;
font-size: 0.7em;
line-height: 1.3em;
padding: 0;
margin: 0;
}
a, a:link, a:active, a:visited {
text-decoration: none;
color: #0088ff;
}
div.entry {
padding: 0 20px 20px 25px;
border-bottom: 1px solid #ddd;
}
div.content img {
}
div.active {
background-color: #f1f5fa;;
}
.read .title a {
color: #aaa;
}
.read .content {
color: #555;
}
div.entry .read .title a {
color: gray;
}
.header {
padding-top: 20px;
margin: 0 0 0.2em 0;
}
.title {
font-size: 1.6em;
font-family: arial, verdana, tahoma;
font-weight: bold;
letter-spacing: -1px;
line-height: 1.1em;
}
div.details {
color: gray;
margin-bottom: 0.5em;
}
div.clear {
clear:both;
height: 1px;
width: 1px;
font-size: 1px;
line-height: 1px;
}
span.modified, span.author, span.category {
}
.status a {
display:block;
line-height: 0;
font-size: 0;
width: 8px;
height: 8px;
margin-top: -1.5em;
background-image: url('<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/unread_8x8.png');
background-repeat: no-repeat;
}
.read .status a {
background-image: url('<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/read_8x8.png');
}
</style>
</head>
<body>
<script type="text/javascript">
var imagebase='file://<xsl:value-of select="/feed:feed/fr:imagebase"/>';
</script>
<xsl:apply-templates select="feed:feed"/>
</body>
</html>
</xsl:template>
<xsl:template match="feed:feed">
<xsl:apply-templates select="feed:entry"/>
</xsl:template>
<xsl:template match="feed:entry">
<base>
<xsl:attribute name="href"><xsl:value-of select = "feed:source/feed:link[@rel='alternate'][1]/@href"/>/</xsl:attribute>
</base>
<div class="entry">
<xsl:attribute name="id">article<xsl:value-of select="fr:item_id"/></xsl:attribute>
<xsl:if test="fr:rtlEnabled = 1">
<xsl:attribute name="style">direction:RTL;</xsl:attribute>
</xsl:if>
<xsl:if test="fr:status = 1">
<xsl:attribute name="class">entry read</xsl:attribute>
</xsl:if>
<div class="header">
<span class="title">
<a>
<xsl:attribute name="href"><xsl:value-of select="feed:link/@href"/></xsl:attribute>
<xsl:value-of select="feed:title"/>
</a>
<a>
<xsl:attribute name="target">_new</xsl:attribute>
<xsl:attribute name="href">http://del.icio.us/post?url=<xsl:value-of select="feed:link/@href"/>&title=
<xsl:call-template name="replace">
<xsl:with-param name="text-string" select="feed:title"/>
<xsl:with-param name="find-word" select="' '"/>
<xsl:with-param name="replace-with" select="'%20'"/>
</xsl:call-template>
</xsl:attribute>
<img>
<xsl:attribute name="border">0</xsl:attribute>
<xsl:attribute name="hspace">5</xsl:attribute>
<xsl:attribute name="src">file://<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/delicious.gif</xsl:attribute>
</img>
</a>
</span>
<span class="status">
<xsl:attribute name="style">float:right;</xsl:attribute>
<xsl:if test="fr:rtlEnabled = 1">
<xsl:attribute name="style">float:left;</xsl:attribute>
</xsl:if>
<xsl:if test="fr:rtlEnabled != 1">
<xsl:attribute name="style">float:right;</xsl:attribute>
</xsl:if>
<a>
<xsl:attribute name="id">togglelink<xsl:value-of select="fr:item_id"/></xsl:attribute>
<xsl:attribute name="href">fr:toggleread/<xsl:value-of select="fr:item_id"/></xsl:attribute>
<xsl:attribute name="onclick">this.blur();</xsl:attribute>
</a>
</span>
</div>
<div class="details">
<span class="updated"><xsl:value-of select="fr:updated"/>, </span>
<xsl:if test="feed:author">
<span class="author">
<xsl:apply-templates select="feed:author"/>
</span>
</xsl:if>
<a>
<xsl:attribute name="href">fr:edittags/<xsl:value-of select="fr:item_id"/></xsl:attribute>
<img>
<xsl:attribute name="border">0</xsl:attribute>
<xsl:attribute name="hspace">5</xsl:attribute>
<xsl:attribute name="src">file://<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/tag_edit.png</xsl:attribute>
</img>
</a>
<xsl:if test="feed:category">
<span class="category">
<xsl:apply-templates select="feed:category"/>
</span>
</xsl:if>
<xsl:if test="feed:source">
<span class="source">
<a>
<xsl:attribute name="href">fr:feed/<xsl:value-of select="feed:source/fr:feed_id"/></xsl:attribute>
<xsl:value-of select="feed:source/feed:title"/>
</a>
<a>
<xsl:attribute name="href">
<!-- <xsl:for-each select = "feed:source/feed:link[@rel='alternate']"> -->
<xsl:value-of select = "feed:source/feed:link[@rel='alternate'][1]/@href"/>
<!-- </xsl:for-each> -->
</xsl:attribute>
<img>
<xsl:attribute name="border">0</xsl:attribute>
<xsl:attribute name="hspace">5</xsl:attribute>
<xsl:attribute name="src">file://<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/world_go.png</xsl:attribute>
</img>
</a>
</span>
</xsl:if>
</div>
<xsl:if test="feed:content">
<div class="content">
<xsl:value-of disable-output-escaping="yes" select="feed:content"/>
</div>
</xsl:if>
<div class="clear" />
</div>
</xsl:template>
<xsl:template match="feed:category">
<a>
<xsl:attribute name="href">fr:<xsl:value-of select="./@scheme"/></xsl:attribute>
<xsl:value-of select="./@term"/>
</a>,
</xsl:template>
<xsl:template match="feed:author">
<xsl:value-of select="feed:name"/>,
</xsl:template>
</xsl:stylesheet>